#ifndef BARCHARTWIDGET_H
#define BARCHARTWIDGET_H

#include <QWidget>
#include "datareader.h"

class BarChartWidget : public QWidget
{
    Q_OBJECT
public:
    explicit BarChartWidget(QWidget *parent = nullptr);
    void updateChart(const DataPoint &data);

signals:

private:
    void updateYAxisRange();
    QChart *m_chart;
    QBarSet *m_barSet;
    QBarSeries *m_barSeries;
    QBarCategoryAxis *m_axisX;
    QValueAxis *m_axisY;
    QChartView *m_chartView;
};

#endif // BARCHARTWIDGET_H
